package com.master.demo.controller;

import com.master.demo.domain.Message;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * https://localhost:8443/jetty-https/hello/Lily
 */
@RestController
public class HelloWorldRestController {

    @RequestMapping("/hello/{player}")
    public Message message(@PathVariable String player) {

        System.out.println("calling message...");
        Message msg = new Message(player, "Hello " + player);
        return msg;
    }

}
